<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script src="./js/vue.js"></script>
</head>
<body>
    <!-- 
        v-for="(项的变量,下标) in 列表"
        v-for是在项目标签里边定义的
     -->
    <div id="root">
        <h1>您喜欢的水果是?</h1>
        <ul>
            <li v-for="item in fruits">{{item}}</li>
        </ul>
    </div>
    <script>
        new Vue({
            el:'#root',
            data(){
                return{
                    fruits:['苹果','香蕉','葡萄','草莓','西瓜']
                }
            }
        })
    </script>
</body>
</html>